/**
 * Created by Zhang JiRen
 * @date 2022/7/20 0020
 */
import request from "@/utils/request";

const total = params => {
  return request({
    url: "/api/v1/agent/total",
    method: "get",
    data: params
  });
};

const discover = params => {
  return request({
    url: "/api/v1/agent/discover",
    method: "get",
    data: params
  });
};

const bind = params => {
  return request({
    url: "/api/v1/agent/bind",
    method: "post",
    data: params
  });
};

const unbind = params => {
  return request({
    url: "/api/v1/agent/unbind",
    method: "get",
    data: params
  });
};

const list = params => {
  return request({
    url: "/api/v1/agent/list",
    method: "get",
    data: params
  });
};

const name_list = params => {
  return request({
    url: "/api/v1/agent/name/list",
    method: "get",
    data: params
  });
};

const set_name = params => {
  return request({
    url: "/api/v1/agent/set_name",
    method: "post",
    data: params
  });
};

const set_comment = params => {
  return request({
    url: "/api/v1/agent/set_comment",
    method: "post",
    data: params
  });
};

const set_info = params => {
  return request({
    url: "/api/v1/agent/set_info",
    method: "post",
    data: params
  });
};

const enable_monitor = params => {
  return request({
    url: "/api/v1/agent/enable_monitor",
    method: "get",
    data: params
  });
};

const disable_monitor = params => {
  return request({
    url: "/api/v1/agent/disable_monitor",
    method: "get",
    data: params
  });
};

const enable_selfprotect = params => {
  return request({
    url: "/api/v1/agent/enable_selfprotect",
    method: "get",
    data: params
  });
};

const disable_selfprotect = params => {
  return request({
    url: "/api/v1/agent/disable_selfprotect",
    method: "get",
    data: params
  });
};

const start_netcontain = params => {
  return request({
    url: "/api/v1/agent/start_netcontain",
    method: "get",
    data: params
  });
};

const stop_netcontain = params => {
  return request({
    url: "/api/v1/agent/stop_netcontain",
    method: "get",
    data: params
  });
};

export default {
  total,
  discover,
  bind,
  unbind,
  list,
  name_list,
  set_name,
  set_comment,
  set_info,
  enable_monitor,
  disable_monitor,
  enable_selfprotect,
  disable_selfprotect,
  start_netcontain,
  stop_netcontain
};
